package com.comum.javahomework420242025.pojo;
import com.comum.javahomework420242025.utils.LocalDateTimeDeserializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name = "traceuser")
public class Traceuser {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "chanceid")
    private Long chanceid;

    @Column(name = "userid")
    private Long userid;


    @ManyToOne
    @JoinColumn(name = "chanceid", insertable = false, updatable = false)
    private Chance chance;


    @ManyToOne
    @JoinColumn(name = "userid", insertable = false, updatable = false)
    private User user;
}